package com.sanyang.pda.adapter;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.sanyang.pda.bean.CalendarBean;
import com.wangshen.base.ui.mvp.base.adapter.BaseAdapter;
import com.wangshen.projectbase.R;

import java.util.List;

public class CalendarAdapter extends BaseAdapter<CalendarBean> {
    public CalendarAdapter(int layoutResId, @Nullable List<CalendarBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, CalendarBean item) {
        super.convert(helper, item);
        if (item.getType()==0){
            helper.setText(R.id.tv_day,"");
        }else {
            helper.setText(R.id.tv_day,item.getDay()+"");
        }
        if (!item.isSelect()){
            helper.setTextColor(R.id.tv_day,getContext().getResources().getColor(R.color._7E7E7E));
        }else {
            helper.setTextColor(R.id.tv_day,getContext().getResources().getColor(R.color.bg_black));
        }
    }
}
